<template>
    <NewCard title="分成调价申请" :isright="true">
        <template slot="right">
            <p class="divideBtn" @click="drawer=true">调价记录 <i class="el-icon-document"></i></p>
        </template>
        <!-- 调价记录抽屉 -->
        <div class="apply-divide">
            <el-drawer
                title="调价记录"
                :visible.sync="drawer"
                size="30%"
                direction="rtl">
                <div class="record">
                    <ul>
                        <li>
                            <h3>
                                <p><i></i>审价通过</p>
                                <p>20220506 19:09:45</p>
                            </h3>
                            <p><b>审批金额：</b>2000元</p>
                        </li>
                        <li>
                            <h3>
                                <p><i></i>申请调价</p>
                                <p>20220506 19:09:45</p>
                            </h3>
                            <p><b>申请金额：</b>2000元</p>
                            <p><b>原分成：</b>1700元</p>
                            <p><b>申请原因：</b>客户地处偏远地区，需要增加差旅费</p>
                        </li>
                    </ul>
                </div>
            </el-drawer>
        </div>

        <!-- 表单 -->
        <div class="pricing-for">
            <el-form ref="form" :model="pricingFrom" label-width="100px" label-position="left">
                <el-form-item label="订单号">
                    <el-input v-model="pricingFrom.orderNum" disabled></el-input>
                </el-form-item>
                <el-form-item label="项目名称">
                    <el-input v-model="pricingFrom.title" disabled></el-input>
                </el-form-item>
                <el-form-item label="当前分成">
                    <el-input v-model="pricingFrom.divide" disabled></el-input>
                </el-form-item>
                <el-form-item label="申请分成">
                    <el-input v-model="pricingFrom.applyDivide" placeholder="请输入申请调整的金额"></el-input>
                </el-form-item>
                <el-form-item label="调价原因">
                    <el-input type="textarea" :rows="8" v-model="pricingFrom.cause" placeholder="请输入调价原因" resize="none"></el-input>
                </el-form-item>
            </el-form>
            <SubBtn>
                <template slot="btn">
                    <el-button round>重设</el-button>
                    <el-button type="primary" round>提交申请</el-button>
                </template>
            </SubBtn>
        </div>
    </NewCard>
</template>

<script>
import NewCard from "@/wss/components/newCard.vue";
import SubBtn from "@/wss/components/subBtn.vue";
export default {
    name:'PricingFor',
    components:{NewCard,SubBtn},
    data(){
        return{
            // 调价记录抽屉
            drawer:false,
            // 表单数据
            pricingFrom:{
                orderNum:'',
                title:'',
                divide:'',
                applyDivide:'',
                cause:'',
            },
        }
    },
}
</script>

<style scoped>
ul,h3,h4,p{
  list-style: none;
  margin: 0;
  padding: 0;
}
/* 调价记录 */
.divideBtn{
    font-size: 12px;
    color: #606E84;
    cursor: pointer;
}
::v-deep .apply-divide .el-drawer__header{
    border-bottom: 1px solid #EFEFEF;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
::v-deep .apply-divide .el-drawer__header>span{
    font-size: 18px;
    font-weight: bold;
    color: #2E3F5E;
    padding-left: 20px;
    background: url('~@/wss/assets/image/icon/cardLeft.png') left center no-repeat;
    background-size: 7px;
}
.record{
    padding: 0 20px;
}
.record li{
    position: relative;
}
.record li>h3{
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #909AAA;
    margin-top: 15px;
    margin-bottom: 15px;
}
.record li::before{
    content: '';
    position: absolute;
    left: 1.5px;
    top: 10px;
    display: block;
    width: 1px;
    height: 115%;
    background-color: #EFEFEF;
}
.record li>h3 i{
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #909AAA;
    margin-right: 5px;
}
.record li>h3>p:first-child{
    display: flex;
    align-items: center;
}
.record li>h3>p:last-child{
    font-size: 12px;
    font-weight: 400;
    color: #909AAA;
}
.record li>p{
    margin-left: 10px;
    font-size: 12px;
    line-height: 24px;
    font-weight: 400;
    color: #2E3F5E;
}
.record li>p>b{
    display: inline-block;
    font-weight: 400;
    width: 20%;
}
.record li:last-child::before{
    display: none;
}
/* 调价记录 end*/

/* 表单 */
.pricing-for .el-form{
    margin-bottom: 60px;
}
.pricing-for .el-form >>> .el-form-item__label{
    color: #2E3F5E;
}
.pricing-for .el-form .el-form-item .el-input,
.pricing-for .el-form .el-form-item .el-textarea{
    width: 100%!important;
}
.pricing-for .el-form .el-form-item >>> .el-textarea .el-textarea__inner{
    font-family: Microsoft Yahei;
}

/* 右侧按钮样式 */
::v-deep .subBtn{
  padding: 8px 30px!important;
  z-index: 99;
}
::v-deep .subBtn>.el-button{
  width: 100px;
  padding: 8px 0!important;
  font-size: 14px;
  color: #606E84;
}
::v-deep .subBtn>.el-button.el-button--primary{
  background-color: #F87A23;
  border-color: #F87A23;
  color: #fff;
}
</style>